// const random = require("./小功能/取随机数")
// const bind = require("./小功能/bind")
// const me = { name: 'Jack' }
// const other = { name: 'Jackson' }
// function say() {
//   console.log(`My name is ${this.name || 'default'}`);
// }
// const meSay = say.myBind(me)
// meSay()
// const otherSay = say.myBind(other)
// otherSay()
// random(1,11)
// import Promise from "./Promise/promise"
// let mypromise = new Promise((resolve,reject)=>{
//   console.log("1");
//   resolve(2)
// });
// console.log(mypromise);
// mypromise.then((res)=>{
//   console.log(res);
// })
let obj = { name: 1 }
const useProise = async () => {
  await new Promise(async (resolve, reject) => {
    for (let i = 0; i < 5; i++) {
      await setTimeout(() => {
        obj['name' + i] = i;
      }, 2000);
    }
    resolve();

  })
}
const use12 = async () => {
  await useProise().then(data => {
    console.log(obj)
  })
}
use12();
/**
* type = 小时制度
* time = 时间值
*/
const readTime(type = '12', time){
  let finalTime;
  if (time) {
    let time = new Date(time);
  }
  if (type == '12') {
    finalTime =
  } else {

  }
}
// console.log(1)
// setTimeout(() => {
//   console.log(2)
// }, 200);
// console.log(3)
